﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using com.opttek.optquest;

namespace ConsoleApplication1
{
    class DesignVariable : COptQuestDesignVariable
    {
        public DesignMachine designMachine;
        public int time;

        public DesignVariable(DesignMachine machine,  string key, int i, double lowerbound, double upperbound, double step)
            :base(key,lowerbound,upperbound,step)
        {
            this.designMachine = machine;
            time = i;
        }


        public double isMatProducing(COptQuestSolution sol, Materials mat)
        {
             return designMachine.isMatProducing(sol,this, mat.material);            
          
        }

        public double isMatProducing(COptQuestSolution sol, string matkey)
        {
           
          return designMachine.isMatProducing(sol,this, matkey);

        }

        public string getMatkey(int position)
        {
            return designMachine.materialKeys[position];
        }

    }
}
